home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / perl / msds-prl / prl386l1.zoo / makefile < prev    next >
Makefile  |  1992-07-29  |  10KB  |  363 lines

  1. # $Id: MAKEFILE 1.1 92/07/19 14:26:13 doi Exp $
  2. # : Makefile.SH,v 11668Revision: 4.0.1.4 11668Date: 92/06/08 11:40:43 
  3. #
  4. # Log:    Makefile.SH,v 
  5. # Revision 4.0.1.4  92/06/08  11:40:43  lwall
  6. # patch20: cray didn't give enough memory to /bin/sh
  7. # patch20: various and sundry fixes
  8. # Revision 4.0.1.3  91/11/05  15:48:11  lwall
  9. # patch11: saberized perl
  10. # patch11: added support for dbz
  11. # Revision 4.0.1.2  91/06/07  10:14:43  lwall
  12. # patch4: cflags now emits entire cc command except for the filename
  13. # patch4: alternate make programs are now semi-supported
  14. # patch4: uperl.o no longer tries to link in libraries prematurely
  15. # patch4: installperl now installs x2p stuff too
  16. # Revision 4.0.1.1  91/04/11  17:30:39  lwall
  17. # patch1: C flags are now settable on a per-file basis
  18. # Revision 4.0  91/03/20  00:58:54  lwall
  19. # 4.0 baseline.
  20. # makefile modified by hand to build on MS-DOS using DJGPP
  21. # Hitoshi Doi <doi@jrd.dec.com>, 1992.06.28
  22.  
  23. CC = gcc            # use DJGPP
  24. YACC = /pub/gcc/bin/bison
  25. bin = /usr/local/bin
  26. scriptdir = /usr/local/bin
  27. privlib = /usr/local/lib/perl
  28. mansrc = 
  29. manext = 
  30. LDFLAGS = 
  31. CLDFLAGS = 
  32. SMALL = 
  33. LARGE =  
  34. mallocsrc = 
  35. mallocobj = 
  36. SLN = ln -s
  37. RMS = rm -f
  38.  
  39. # use libraries: globbing, ufc-crypt
  40. libs = msdos/libmsdos.a -lglob -lufc -lc -lm -lpc    # use DJGPP
  41.  
  42. public = perl taintperl 
  43.  
  44. shellflags = 
  45.  
  46. # To use an alternate make, set  in config.sh.
  47. MAKE = make
  48.  
  49.  
  50. #CCCMD = `sh $(shellflags) cflags $@`
  51. CCCMD = $(CC) -O -c        # use DJGPP
  52.  
  53. private = 
  54.  
  55. scripts = h2ph
  56.  
  57. manpages = perl.man h2ph.man
  58.  
  59. util =
  60.  
  61. sh = Makefile.SH makedepend.SH h2ph.SH
  62.  
  63. h1 = EXTERN.h INTERN.h arg.h array.h cmd.h config.h form.h handy.h
  64. h2 = hash.h perl.h regcomp.h regexp.h spat.h stab.h str.h util.h
  65.  
  66. h = $(h1) $(h2)
  67.  
  68. c1 = array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c
  69. c2 = eval.c form.c hash.c $(mallocsrc) perl.c regcomp.c regexec.c
  70. c3 = stab.c str.c toke.c util.c usersub.c
  71.  
  72. c = $(c1) $(c2) $(c3)
  73.  
  74. s1 = array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c
  75. s2 = eval.c form.c hash.c perl.c regcomp.c regexec.c
  76. s3 = stab.c str.c toke.c util.c usersub.c perly.c
  77.  
  78. saber = $(s1) $(s2) $(s3)
  79.  
  80. obj1 = array.o cmd.o cons.o consarg.o doarg.o doio.o dolist.o dump.o
  81. obj2 = eval.o form.o $(mallocobj) perl.o regcomp.o regexec.o
  82. obj3 = stab.o str.o toke.o util.o
  83.  
  84. obj = $(obj1) $(obj2) $(obj3)
  85.  
  86. tobj1 = tarray.o tcmd.o tcons.o tconsarg.o tdoarg.o tdoio.o tdolist.o tdump.o
  87. tobj2 = teval.o tform.o thash.o $(mallocobj) tregcomp.o tregexec.o
  88. tobj3 = tstab.o tstr.o ttoke.o tutil.o
  89.  
  90. tobj = $(tobj1) $(tobj2) $(tobj3)
  91.  
  92. lintflags = -hbvxac
  93.  
  94. addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
  95.  
  96. # grrr
  97. #SHELL = /bin/sh
  98.  
  99. .c.o:
  100.     $(CCCMD) $*.c
  101.  
  102. # MS-DOS perl
  103. all: perlstub.exe perl386.exe
  104.  
  105. STUB = /pub/gcc/bin/stub.exe
  106. GO32 = /pub/gcc/bin/go32.exe
  107. perlstub.exe: perl
  108.     /usr/bin/cat +binary $(STUB) perl > perlstub.exe
  109. perl386.exe: perl
  110.     /usr/bin/cat +binary $(GO32) perl > perl386.exe
  111.  
  112. # put the list of objects in a file because of MS-DOS limits
  113. objfile = perlobjs
  114.  
  115. # round up all files modified for perl386
  116. KITDIR = ../386kit
  117. MODSRC = config.h perl.c doio.c toke.c makefile $(objfile) readme.386 \
  118.     msdos/popen.c msdos/msdos.c msdos/makefile.386
  119. 386kit: $(KITDIR)
  120.     cp perl386.exe $(KITDIR)
  121.     cp $(MODSRC) $(KITDIR)
  122. $(KITDIR):
  123.     mkdir $(KITDIR)
  124.  
  125. #all: $(public) $(private) $(util) uperl.o $(scripts)
  126. #    cd x2p; $(MAKE) all
  127. #    touch all
  128.  
  129. # This is the standard version that contains no "taint" checks and is
  130. # used for all scripts that aren't set-id or running under something set-id.
  131. # The $& notation is tells Sequent machines that it can do a parallel make,
  132. # and is harmless otherwise.
  133.  
  134. perl: $& perly.o $(obj) hash.o usersub.o
  135. #    $(CC) $(LARGE) $(CLDFLAGS) $(obj) hash.o perly.o usersub.o $(libs) -o perl
  136.     $(CC) $(LARGE) $(CLDFLAGS) @$(objfile) $(mallocobj) $(libs) -o perl
  137.  
  138. # This command assumes that /usr/include/dbz.h and /usr/lib/dbz.o exist.
  139.  
  140. dbzperl: $& perly.o $(obj) zhash.o usersub.o
  141.     $(CC) $(LARGE) $(CLDFLAGS) $(obj) zhash.o /usr/lib/dbz.o perly.o usersub.o $(libs) -o dbzperl
  142.  
  143. zhash.o: hash.c $(h)
  144.     $(RMS) zhash.c
  145.     $(SLN) hash.c zhash.c
  146.     $(CCCMD) -DWANT_DBZ zhash.c
  147.     $(RMS) zhash.c
  148.  
  149. uperl.o: $& perly.o $(obj) hash.o
  150.     -ld $(LARGE) $(LDFLAGS) -r $(obj) hash.o perly.o -o uperl.o
  151.  
  152. saber: $(saber)
  153.     # load $(saber)
  154.     # load /lib/libm.a
  155.  
  156. # This version, if specified in Configure, does ONLY those scripts which need
  157. # set-id emulation.  Suidperl must be setuid root.  It contains the "taint"
  158. # checks as well as the special code to validate that the script in question
  159. # has been invoked correctly.
  160.  
  161. suidperl: $& tperly.o sperl.o $(tobj) usersub.o
  162.     $(CC) $(LARGE) $(CLDFLAGS) sperl.o $(tobj) tperly.o usersub.o $(libs) \
  163.         -o suidperl
  164.  
  165. # This version interprets scripts that are already set-id either via a wrapper
  166. # or through the kernel allowing set-id scripts (bad idea).  Taintperl must
  167. # NOT be setuid to root or anything else.  The only difference between it
  168. # and normal perl is the presence of the "taint" checks.
  169.  
  170. taintperl: $& tperly.o tperl.o $(tobj) usersub.o
  171.     $(CC) $(LARGE) $(CLDFLAGS) tperl.o $(tobj) tperly.o usersub.o $(libs) \
  172.         -o taintperl
  173.  
  174. # Replicating all this junk is yucky, but I don't see a portable way to fix it.
  175.  
  176. tperly.o: perly.c perly.h $(h)
  177.     $(RMS) tperly.c
  178.     $(SLN) perly.c tperly.c
  179.     $(CCCMD) -DTAINT tperly.c
  180.     $(RMS) tperly.c
  181.  
  182. tperl.o: perl.c perly.h patchlevel.h perl.h $(h)
  183.     $(RMS) tperl.c
  184.     $(SLN) perl.c tperl.c
  185.     $(CCCMD) -DTAINT tperl.c
  186.     $(RMS) tperl.c
  187.  
  188. sperl.o: perl.c perly.h patchlevel.h $(h)
  189.     $(RMS) sperl.c
  190.     $(SLN) perl.c sperl.c
  191.     $(CCCMD) -DTAINT -DIAMSUID sperl.c
  192.     $(RMS) sperl.c
  193.  
  194. tarray.o: array.c $(h)
  195.     $(RMS) tarray.c
  196.     $(SLN) array.c tarray.c
  197.     $(CCCMD) -DTAINT tarray.c
  198.     $(RMS) tarray.c
  199.  
  200. tcmd.o: cmd.c $(h)
  201.     $(RMS) tcmd.c
  202.     $(SLN) cmd.c tcmd.c
  203.     $(CCCMD) -DTAINT tcmd.c
  204.     $(RMS) tcmd.c
  205.  
  206. tcons.o: cons.c $(h) perly.h
  207.     $(RMS) tcons.c
  208.     $(SLN) cons.c tcons.c
  209.     $(CCCMD) -DTAINT tcons.c
  210.     $(RMS) tcons.c
  211.  
  212. tconsarg.o: consarg.c $(h)
  213.     $(RMS) tconsarg.c
  214.     $(SLN) consarg.c tconsarg.c
  215.     $(CCCMD) -DTAINT tconsarg.c
  216.     $(RMS) tconsarg.c
  217.  
  218. tdoarg.o: doarg.c $(h)
  219.     $(RMS) tdoarg.c
  220.     $(SLN) doarg.c tdoarg.c
  221.     $(CCCMD) -DTAINT tdoarg.c
  222.     $(RMS) tdoarg.c
  223.  
  224. tdoio.o: doio.c $(h)
  225.     $(RMS) tdoio.c
  226.     $(SLN) doio.c tdoio.c
  227.     $(CCCMD) -DTAINT tdoio.c
  228.     $(RMS) tdoio.c
  229.  
  230. tdolist.o: dolist.c $(h)
  231.     $(RMS) tdolist.c
  232.     $(SLN) dolist.c tdolist.c
  233.     $(CCCMD) -DTAINT tdolist.c
  234.     $(RMS) tdolist.c
  235.  
  236. tdump.o: dump.c $(h)
  237.     $(RMS) tdump.c
  238.     $(SLN) dump.c tdump.c
  239.     $(CCCMD) -DTAINT tdump.c
  240.     $(RMS) tdump.c
  241.  
  242. teval.o: eval.c $(h)
  243.     $(RMS) teval.c
  244.     $(SLN) eval.c teval.c
  245.     $(CCCMD) -DTAINT teval.c
  246.     $(RMS) teval.c
  247.  
  248. tform.o: form.c $(h)
  249.     $(RMS) tform.c
  250.     $(SLN) form.c tform.c
  251.     $(CCCMD) -DTAINT tform.c
  252.     $(RMS) tform.c
  253.  
  254. thash.o: hash.c $(h)
  255.     $(RMS) thash.c
  256.     $(SLN) hash.c thash.c
  257.     $(CCCMD) -DTAINT thash.c
  258.     $(RMS) thash.c
  259.  
  260. tregcomp.o: regcomp.c $(h)
  261.     $(RMS) tregcomp.c
  262.     $(SLN) regcomp.c tregcomp.c
  263.     $(CCCMD) -DTAINT tregcomp.c
  264.     $(RMS) tregcomp.c
  265.  
  266. tregexec.o: regexec.c $(h)
  267.     $(RMS) tregexec.c
  268.     $(SLN) regexec.c tregexec.c
  269.     $(CCCMD) -DTAINT tregexec.c
  270.     $(RMS) tregexec.c
  271.  
  272. tstab.o: stab.c $(h)
  273.     $(RMS) tstab.c
  274.     $(SLN) stab.c tstab.c
  275.     $(CCCMD) -DTAINT tstab.c
  276.     $(RMS) tstab.c
  277.  
  278. tstr.o: str.c $(h) perly.h
  279.     $(RMS) tstr.c
  280.     $(SLN) str.c tstr.c
  281.     $(CCCMD) -DTAINT tstr.c
  282.     $(RMS) tstr.c
  283.  
  284. ttoke.o: toke.c $(h) perly.h
  285.     $(RMS) ttoke.c
  286.     $(SLN) toke.c ttoke.c
  287.     $(CCCMD) -DTAINT ttoke.c
  288.     $(RMS) ttoke.c
  289.  
  290. tutil.o: util.c $(h)
  291.     $(RMS) tutil.c
  292.     $(SLN) util.c tutil.c
  293.     $(CCCMD) -DTAINT tutil.c
  294.     $(RMS) tutil.c
  295.  
  296. perly.h: perly.c
  297.     @ echo Dummy dependency for dumb parallel make
  298.     touch perly.h
  299.  
  300. # use the perly.c already built on UNIX for DJGPP
  301. # perly.c: perly.y perly.fixer
  302. #    @ \
  303. #case "$(YACC)" in \
  304. #    *bison*) echo 'Expect' 25 shift/reduce and 59 reduce/reduce conflicts;; \
  305. #    *) echo 'Expect' 27 shift/reduce and 57 reduce/reduce conflicts;; \
  306. #esac
  307. #    $(YACC) -d perly.y
  308. #    sh $(shellflags) ./perly.fixer y.tab.c perly.c
  309. #    mv y.tab.h perly.h
  310. #    echo 'extern YYSTYPE yylval;' >>perly.h
  311.  
  312. perly.o: perly.c perly.h $(h)
  313.     $(CCCMD) perly.c
  314.  
  315. install: all
  316.     ./perl installperl
  317.  
  318. clean:
  319.     rm -f *.o all perl taintperl suidperl perly.c
  320.     cd x2p; $(MAKE) clean
  321.  
  322. realclean: clean
  323.     cd x2p; $(MAKE) realclean
  324.     rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man
  325.     rm -f perly.c perly.h t/perl Makefile config.h makedepend makedir
  326.     rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags
  327.     rm -f c2ph pstruct
  328.  
  329. # The following lint has practically everything turned on.  Unfortunately,
  330. # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  331. # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
  332. # for that spot.
  333.  
  334. lint: perly.c $(c)
  335.     lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz
  336.  
  337. depend: makedepend
  338.     - test -f perly.h || cp /dev/null perly.h
  339.     ./makedepend
  340.     - test -s perly.h || /bin/rm -f perly.h
  341.     cd x2p; $(MAKE) depend
  342.  
  343. test: perl
  344.     - cd t && chmod +x TEST */*.t
  345.     - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST </dev/tty
  346.  
  347. clist:
  348.     echo $(c) | tr ' ' '\012' >.clist
  349.  
  350. hlist:
  351.     echo $(h) | tr ' ' '\012' >.hlist
  352.  
  353. shlist:
  354.     echo $(sh) | tr ' ' '\012' >.shlist
  355.  
  356. # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  357. # If this runs make out of memory, delete /usr/include lines.
  358.